<!doctype html>
<html lang="en">
<head>
	<meta charset="UTF-8" />
	<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
	<title>设置</title>
	<link rel="stylesheet" type="text/css" href="../../build/css/base.css"/>
	<link rel="stylesheet" type="text/css" href="../../build/css/style.css">
	<script src="../../build/public/vue.js" charset="utf-8"></script>
	<script src="../../build/public/vue-resource.js" charset="utf-8"></script>
</head>
<body>
	<div id="container" style="padding-bottom:50px;">
		<ul class="set-list">
			<li class="set-list-head">
				<a href="edit.html">
					<img
						class='set-head'
						v-bind:src="picUrl">
					<h4>{{user.name}}</h4>
					<p>查看或编辑个人资料</p>
					<span class="iconfont">&#xe61d;</span>
				</a>
			</li>
		</ul>
		<ul class="set-list">
			<li>
				<a href="editLogin.html">
					<p>修改登录密码</p>
					<span class="iconfont">&#xe61d;</span>
				</a>
			</li>
			<li>
				<a href="password.html">
					<p id="passText">设置交易密码</p>
					<span class="iconfont">&#xe61d;</span>
				</a>
			</li>
			<li>
				<a href="editMobile.html">
					<p>修改手机号码<i style="float:right;font-size:14px;padding-right:15px;">{{mobile}}</i></p>
					<span class="iconfont">&#xe61d;</span>
				</a>
			</li>
		</ul>
		<ul class="set-list">
			<li>
				<a href="about.html">
					<p>关于资招</p>
					<span class="iconfont">&#xe61d;</span>
				</a>
			</li>
			<li>
				<a href="customer_service.html">
					<p>客服咨询</p>
					<span class="iconfont">&#xe61d;</span>
				</a>
			</li>
			<!-- <li>
				<a href="#">
					<p>版本号 （V1.1.0）</p>
					<span class="iconfont">&#xe61d;</span>
				</a>
			</li> -->
		</ul>
		<div class="btn-wrap">
			<button class="primary-btn" type="button" @click='removeToken'>退出登录</button>
		</div>
	</div>
<script src="../../build/js/config.js" charset="utf-8"></script>
<script src="../../build/js/common.js" charset="utf-8"></script>
<script type="text/javascript">
var vm = new Vue({
	el:"#container",
	data:{
		info:[],
		user:[],
		picUrl:'',
		mobile:'',
	},
	mounted:function(){
		this.$nextTick(function(){
			vm.getData();
		})
	},
	methods:{
		getData:function(){
			noParamsGet('/advisor/financial-advisor/info',function(res){
				vm.info = res.data;
				vm.user = res.data.user;
				vm.mobile =res.data.user.mobile ? res.data.user.mobile.replace(/^(\d{3})\d{4}(\d+)/,"$1****$2") : '';
				vm.picUrl = res.data.user.picture ? res.data.user.picture : '../../build/images/touxiang.png';
				vm.tradePassword =res.data.user.tradePassword;
				if(vm.tradePassword==true){
					document.getElementById('passText').innerHTML='修改交易密码';
				}
			})
		},
		removeToken:function(){
			window.localStorage.removeItem(siteTokenKey);
			window.location.href='../login/login.html'
		},
	}
})
</script>
</body>
</html>
